
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

//1 3 5 6 4

class Solution {
public:
   int searchInsert(vector<int>& nums, int target) {
       int l = 0, r = nums.size() - 1;

       while (l <= r)
       {
           int mid = ((r - l)) >> 1 + l;
           if (nums[mid] >= target) r = mid;
           else l = mid + 1;
       }
       cout << "xaxxxx  " << nums[l] << endl;
       if (nums[l] >= target) return l;
       else return l + 1;
   }
};

int main()
{
   /* Solution S;
    vector<int>nums(4);
    for (int i = 0; i < 4; i++) cin >> nums[i];

    int target;
    cin >> target;

    cout << S.searchInsert(nums, target) << endl;*/

   int l, r;
   cin >> l >> r;
   //int mid1 = (r - l) >> 1 + l;
   int mid2 = ((r - l) >> 1) + 1;
   // cout << mid1 << endl;
   cout << mid2 << endl;

   return 0;
}